CFLAGS = -O2 -g -std=c99
LDFLAGS = -ltiff -lm -lz

.SUFFIXES: .c

.c.o:
	cc -c $(CFLAGS) $<

all: merge stitch merge_old

merge: merge.o tiff.o tiff.h
	cc merge.o tiff.o $(LDFLAGS) -o merge

merge_old: merge_old.o tiff.o tiff.h
	cc merge_old.o tiff.o $(LDFLAGS) -o merge_old

stitch: stitch.o
	cc stitch.o $(LDFLAGS) -o stitch

clean:
	-rm -f *~ *.o merge stitch merge_old
